package com.wenhai.leetcode.string;

/**
 * https://leetcode-cn.com/problems/permutation-in-string/
 * <p>
 * 字符串的排列
 *
 * @author wenhai
 * @date 2021/2/10
 */
public class _567字符串的排列 {


    public static void main(String[] args) {
        checkInclusion("ab", "eidbaooo");
    }

    public static boolean checkInclusion(String s1, String s2) {
        StringBuilder sb = new StringBuilder();
        for (int i = s1.length()-1; i >= 0; i--) {
            sb.append(s1.charAt(i));

        }
        return s2.contains(sb.toString());
    }

}
